package com.geli.smarttools.bean;


public class SettingBean {

    /**
     * 开关
     */
    private  int mPower;
    /**
     * 温度
     */
    private  int mTmp;
    /**
     * 模式
     */
    private  int mMode;
    /**
     * 自动手动 ,节能省电
     */
    private  int menergy;
    /**
     * 风向
     */
    private  int mWindDir;
    /**
     * 风量
     */
    private  int mWindCount;

    public SettingBean(int mPower, int mTmp, int mMode, int menergy, int mWindDir, int mWindCount) {
        this.mPower = mPower;
        this.mTmp = mTmp;
        this.mMode = mMode;
        this.menergy = menergy;
        this.mWindDir = mWindDir;
        this.mWindCount = mWindCount;
    }


    public int getmTmp() {
        return mTmp;
    }

    public void setmTmp(int mTmp) {
        this.mTmp = mTmp;
    }

    public int getmMode() {
        return mMode;
    }

    public void setmMode(int mMode) {
        this.mMode = mMode;
    }

    public int getmPower() {
        return mPower;
    }

    public void setmPower(int mPower) {
        this.mPower = mPower;
    }

    public int getmenergy() {
        return menergy;
    }

    public void setmenergy(int menergy) {
        this.menergy = menergy;
    }

    public int getmWindCount() {
        return mWindCount;
    }

    public void setmWindCount(int mWindCount) {
        this.mWindCount = mWindCount;
    }

    public int getmWindDir() {
        return mWindDir;
    }

    public void setmWindDir(int mWindDir) {
        this.mWindDir = mWindDir;
    }

    /**
     * 关机状态
     */
    public boolean isPowerOff(){
        //  0x01 开机 ， 00 关机
        return  getmPower() == 0x00 ;
    }



    public String getCurrentModeInfo(){
        int mode = getmMode() ;
        String str ="N/A";

        switch (mode){
            case  0x00:
                str="模式：自动" ;
                break;
            case  0x01:
                str="模式：制冷" ;
                break;
            case  0x02:
                str="模式：抽湿" ;
                break;
            case  0x03:
                str="模式：送风" ;
                break;
            case  0x04:
                str="模式：制热" ;
                break;
        }

        return str ;
    }


    public String getWindCountInfo(){
        String info="N/A" ;
        int value = getmWindCount();
        switch (value){
            case  0x00:
                info="风量：自动" ;
                break;
            case  0x01:
                info="风量：低" ;
                break;
            case  0x02:
                info="风量：中" ;
                break;
            case  0x03:
                info="风量：高" ;
                break;
        }
        return  info ;
    }

    public String getWindirectionInfo(){
        String info="N/A" ;
        int value = getmWindDir();
        switch (value){
            case  0x00:
                info="扫风：自动" ;
                break;
            case  0x01:
                info="扫风：上下" ;
                break;
            case  0x02:
                info="扫风：左右" ;
                break;
        }
        return  info ;
    }


    public String getMenergyInfo(){
        String info="N/A" ;
        int value = getmenergy();
        switch (value){
            case  0x00:
                info="耗能：正常" ;
                break;
            case  0x01:
                info="耗能：节能" ;
                break;
        }
        return  info ;
    }


}
